package com.shujia.four;

public class GenericInterImpl<T, E> implements GenericInter<T, E> {

    public static void main(String[] args) {
        // 使用泛型接口同样可以使用多态
        // GenericInterImpl<String, Integer> demo = new GenericInterImpl();
        GenericInter<String, Integer> demo = new GenericInterImpl<>();

        Integer num = demo.play("123");
        System.out.println(num);
    }


    @Override
    public E play(T t) {
        return (E) Integer.valueOf(t + "");
    }
}
